package com.sskj.xyft.mine;

import com.sskj.xyft.BasePresenter;
import com.sskj.xyft.api.ApiObserver;
import com.sskj.base.data.User;
import com.sskj.base.utils.RxUtils;
import com.sskj.xyft.api.Api;


/**
 * @author Hey
 * Create at  2019/03/20
 */
class AccountDetailPresenter extends BasePresenter<AccountDetailActivity> {
    public void getAccountDetail(String account) {
        Api.getInstance().accountDetail()
                .compose(RxUtils.transform())
                .subscribe(new ApiObserver<User>(this, true) {
                    @Override
                    public void onSuccess(User data) {
                        mView.setAccountInfo(data);
                    }
                });
    }
}
